/**
 * Created by 47161 on 2017/5/8.
 */



window.onload=function () {
    window.onresize=adjust;
    adjust();
    // var urlindex=GetQueryString("index");
    // if(urlindex){
    //     showContent(urlindex);
    // }else {
    //     console.log(12);
    //     $('.content3').show();
    // }

    //        $("img").lazyload({
//            effect:"fadeIn",
//            threshold : 100
//        });

};

//    根据视口宽度给body增/删class
function adjust() {
    var bodyWidth=document.body.clientWidth;
    if(bodyWidth<=1550){
        $('.standard').hasClass('w-lg')?$('.standard').removeClass('w-lg'):true;

    }else if(bodyWidth>1550){
        $('.standard').hasClass('w-lg')?true:$('.standard').addClass('w-lg');
    }
}

//获取地址栏参数信息
function GetQueryString(name)
{
    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r!=null)return  unescape(r[2]); return null;
};

$(".content1 .animate-slide ul").on('click','li',function () {

    var index=$(this).attr('index');
    // console.log(index);
    skip(index);
});
function skip(index) {
    var titleList=["introduce.html","service.html","industry.html","case.html","research.html","analyze.html","viewangle.html","contact.html"];
    location.href=titleList[aindex]+"?index="+index;
}
